﻿using Microsoft.AspNetCore.Authorization;

namespace RndMaterialDisposal.Extensions.Authorization
{
    public class PermissionAuthorizationRequirement: IAuthorizationRequirement
    {
        public PermissionAuthorizationRequirement(string name)
        {
            Name = name;
        }
        public string Name { get; set; }
    }

    public static class UserPermission
    {
        //用户模块权限
        public const string User = "User";
        //用户查询权限
        public const string UserList = User + ":List";
        //用户新增权限
        public const string UserCreate = User + ":Create";
        //用户删除权限
        public const string UserDelete = User + ":Delete";
        //用户跟新权限
        public const string UserUpdate = User + ":Update";
    }
}
